import Vue from 'vue';
import App from './App.vue';
import router from './router';
import store from './store';
import VueLazyload from 'vue-lazyload';
import { Dialog, Toast } from 'vant';
import { $copy } from './assets/js/public/main';
import { axios } from './assets/js/public/http';
import { $commit } from './assets/js/public/store';
import { $log, $alert, $confirm,  $fail } from './assets/js/public/layer';
import VueAwesomeSwiper from 'vue-awesome-swiper';
import 'swiper/dist/css/swiper.min.css';
//添加全局组件
Vue.use(VueAwesomeSwiper);
Vue.use(Dialog, Toast);
Vue.use(VueLazyload, {
  preLoad: 1.3,
  attempt: 1,
  error: require('./assets/images/error.png'),
  loading: require('./assets/images/loading.gif')
});
//添加原型
$copy(Vue.prototype, {
  $copy,
  $http: axios,
  $log,
  $alert,
  $confirm,
  $fail,
  $commit
  
});
//全局混入


Vue.config.productionTip = false;
new Vue({
  router,
  store,
  render: h => h(App),
  mixins: []
}).$mount('#app');

